scale: Make the area around the trough clickable
authorMatthias Clasen <mclasen@redhat.com>
Wed, 13 May 2020 19:23:23 +0000 (15:23 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 13 May 2020 19:27:35 +0000 (15:27 -0400)
The narrow trough is too hard to hit as a click target.
Make the entire scale clickable.

gtk/gtkrange.c

index 95c728a4fe91fe60e0bd73eb684c5cbf67d2c308..38efd2aec467f494257abf859c1ee52d88cdca93 100644 (file)
@@ -1878,10 +1878,10 @@ gtk_range_click_gesture_pressed (GtkGestureClick *gesture,
 
   mouse_location = gtk_widget_pick (widget, x, y, 0);
 
-  /* For the purposes of this function, we ignore fill and highlight and
-   * handle them like the trough */
-  if (mouse_location == priv->fill_widget ||
-      mouse_location == priv->highlight_widget)
+  /* For the purposes of this function, we treat anything outside
+   * the slider like a click on the trough
+   */
+  if (mouse_location != priv->slider_widget)
     mouse_location = priv->trough_widget;
 
   if (mouse_location == priv->slider_widget)